﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using intro.Models;

namespace intro.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/
        [HttpGet] // Anropas vid en get request till controllern
        public ActionResult Index()
        {
            var model = new ElementaryMath();
            return View(model);
        }


        // POST
        [HttpPost] // Anropas vid en post request till controllern
        public ActionResult Index(ElementaryMath elementaryMath)
        {
            elementaryMath.Compute();
            return View(elementaryMath);
        }

    }
}
